package org.dromara.system.service;

import org.dromara.system.domain.SysAccount;
import org.dromara.system.domain.vo.SysAccountVo;
import org.dromara.system.domain.bo.SysAccountBo;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.mybatis.core.page.PageQuery;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import java.util.Collection;
import java.util.List;
import java.util.function.Function;

/**
 * 账号Service接口
 *
 * @author yilong.fu
 * @date 2024-09-14
 */
public interface ISysAccountService {

    /**
     * 查询账号
     */
    SysAccountVo getOne(SysAccountBo bo);

    SysAccountVo getOne(QueryWrapper<SysAccount> wrapper);

    Long count(QueryWrapper<SysAccount> wrapper);


    /**
    * 查询账号
    */
        SysAccountVo getOne(SysAccountBo bo, Function<LambdaQueryWrapper<SysAccount>, Boolean>
        func);

    /**
     * 查询账号
     */
    SysAccountVo queryById(Long accountId);

    /**
     * 查询账号列表
     */
    TableDataInfo<SysAccountVo> queryPageList(SysAccountBo bo, PageQuery pageQuery);

    /**
   * 查询账号列表
   */
    TableDataInfo<SysAccountVo> queryPageList(SysAccountBo bo, PageQuery pageQuery,
                                                  Function<LambdaQueryWrapper<SysAccount>, Boolean>
                                                      func);

    /**
     * 查询账号列表
     */
    List<SysAccountVo> queryList(SysAccountBo bo);

    /**
     * 查询账号列表
     */
    List<SysAccountVo> queryList(SysAccountBo bo,
                                     Function<LambdaQueryWrapper<SysAccount>, Boolean>
                                         func);

    /**
     * 新增账号
     */
    Boolean insertByBo(SysAccountBo bo);

    /**
     * 修改账号
     */
    Boolean updateByBo(SysAccountBo bo);

    /**
     * 校验并删除账号信息
     */
    Boolean deleteWithValidById(Long id, Boolean isValid);
    /**
     * 校验并批量删除账号信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
}
